import request from '@/utils/request'

// 根据名称模糊查询专业
export const getMajorByName = (name)=>request({
    url:'question/attribute/getMajorByName',
    method:'get',
    params:{
        name
    }
});
// 根据名称模糊查询科目
export const getSubjectByName = (name)=>request({
    url:'question/attribute/getSubjectByName',
    method:'get',
    params:{
        name
    }
});
// 根据题型名称查询题型
export const getTypeByName = (name)=>request({
    url:'question/attribute/getTypeByName',
    method:'get',
    params:{
        name
    }
});
// 获取所有专业map
export const getMajorMap = ()=>request({
    url:'question/attribute/getMajorMap',
    method:'get',
});
// 增加一个专业
export const addOneMajor = (major)=>request({
    url:'question/attribute/addOneMajor',
    method:'put',
    params:{major}
});
// 修改一个专业名
export const updateOneMajor = (major)=>request({
    url:'question/attribute/updateOneMajor',
    method:'post',
    data:major
});
// 获取所有科目map
export const getSubjectMap = ()=>request({
    url:'question/attribute/getSubjectMap',
    method:'get',
});
// 新增一个科目
export const addOneSubject = (subject)=>request({
    url:'question/attribute/addOneSubject',
    method:'put',
    params:{subject}
});
// 修改一个科目名
export const updateOneSubject = (subject)=>request({
    url:'question/attribute/updateOneSubject',
    method:'post',
    data:subject
});
// 获取所有题型map
export const getTypeMap = ()=>request({
    url:'question/attribute/getTypeMap',
    method:'get',
});
// 新增一个题型
export const addOneType = (id,type)=>request({
    url:'question/attribute/addOneType',
    method:'post',
    params:{id,type}
});
// 修改一个题型
export const updateOneType = (type)=>request({
    url:'question/attribute/updateOneType',
    method:'post',
    data:type
});


// 查询人脸库组
export const getFaceGroup = ()=>request({
    url:'ucenter/admin/getFaceGroup',
    method:'get',
});

// 添加人脸库组
export const addFaceGroup = ()=>request({
    url:'ucenter/admin/addFaceGroup',
    method:'put',
});
